package com.mystudy.concurrent.myLock;

import java.util.Collection;

/**
 * TODO: 自定义所抽象类
 *
 * @author acy
 * @since 2019/05/15 15:19
 */
public interface MyLock {
	class TimeOutException extends Exception{
		public TimeOutException(String message) {
			super(message);
		}
	}

	void lock() throws InterruptedException;

	void lock(long mills) throws InterruptedException,TimeOutException;

	void unLock();

	Collection<Thread> getBlockedThread();

	int getBlockedSize();
}
